<%@ Page PathInChannel="ajax/member/apply{Ext}" RunAt="Execute" %>
<ali:Get ID="Me" Mark="User" Object="User" Guid="User['ID']"/>
<ali:List ID="Member" Mark="Course" Object="Member" Page="1" PageSize="1" Condition="IsDeleted=false and (ExpiredTime IS NULL or ExpiredTime>DateTime.Now) and UserID=User['ID']" />
<ali:Get ID="Distributer" Mark="User" Object="User" Guid="Request.QueryString['DistributerID']"/>
<ali:List ID="Agent" Mark="Course" Object="Member" Page="1" PageSize="1" Condition="IsDeleted=false and (ExpiredTime IS NULL or ExpiredTime>DateTime.Now) and UserID=Request.QueryString['DistributerID']" />
<ali:Get ID="AgentLevel" Mark="Course" Object="MemberLevel" Guid="Agent[LevelID]" />
{
	"userInnerId":<%=Me[InnerID]%>
	,"userRealName":"<%=Me[RealName]%>"
	,"userMobile":"<%=Me[Mobile]%>"
	,"userNickname":"<%=Me[Nickname]%>"
	,"userHead":"<%=Me[Head]%>"
	<%If !String.IsNullOrEmpty(Request.QueryString['DistributerID'])%>
		,"distributerId":"<%=Distributer[ID]%>"
		,"distributerName":"<%=Distributer[Name]%>"
		,"distributerNickname":"<%=Distributer[Nickname]%>"
		,"distributerHead":"<%=Distributer[Head]%>"
		<%If Agent[Count] == 0%>
			,"distributerIsAgent":false
		<%Else%>
			,"distributerIsAgent":true
			,"agentCommision":<%=AgentLevel[Commision]%>
		<%EndIf%>
	<%EndIf%>
	<ali:List Mark="System" Object="Payment" Condition="Type='WEIXIN_PAY_BY_WAP'">
		<ali:Record>
			,"paymentId":"<%=ID%>"
		</ali:Record>
	</ali:List>
}